import { get, post} from '@/utils/http'

//停止响应
export function stopChatMessages(taskId: string, data: object) {
  return post(`/chat/dify/chat-messages/${taskId}/stop`, data)
}

//获取会话列表
export function listConversations(params: object) {
  return get(`/chat/dify/conversations`, params)
}

//会话重命名
export function renameConversations(conversationId: string, data: object) {
  return post(`/chat/dify/conversations/${conversationId}/name`, data)
}

//删除会话
export function deleteConversations(conversationId: string, data: object) {
  return post(`/chat/dify/conversations/${conversationId}/delete`, data)
}

//获取会话历史消息
export function listMessages(params: object) {
  return get(`/chat/dify/messages`, params)
}

//获取下一轮建议问题列表
export function suggestedMessages(messageId: string, params: object) {
  return get(`/chat/dify/messages/${messageId}/suggested`, params)
}

//消息反馈(点赞)
export function feedbackMessages(messageId: string, data: object) {
  return post(`/chat/dify/messages/${messageId}/feedbacks`, data)
}

//获取应用参数
export function getParameters() {
  return get(`/chat/dify/parameters`, {})
}